/*
 * @Author: Vorga
 * @LastEditors: Vorga
 */
#ifndef TREE_H
#define TREE_H

#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

typedef struct TreeArray
{
    char *arr;
    size_t size;
    size_t cnt;
}TreeArray;

TreeArray *create_ta(char* level);

size_t _height_ta(TreeArray* tree,size_t index);

size_t height_ta(TreeArray* tree);

size_t density_ta(TreeArray* tree);

bool _is_balance_ta(TreeArray* tree,size_t index);

bool is_balance_ta(TreeArray* tree);

void _dlr_ta(TreeArray* tree,size_t index);

void dlr_ta(TreeArray* tree);

void ldr_ta(TreeArray* tree,size_t index);

void lv_ta(TreeArray* tree);
#endif // TREE_H
